import React from "react"
import {withRouter} from 'react-router-dom'
import TriRightIcon from "../../../../../../res/images/web/home/triangle black@2x.png"
import './LinkTitle.css'

const LinkTitle = props => {

    const {
        title,
        history,
        path,
    } = props

    const titleTemplate = (
        <div className='home-link-title-container'>
            <img src={TriRightIcon} alt='tri-right-icon' style={{width: 8, height: 10,}}/>
            <p className='home-link-title'>{title}</p>
            <p
                className='home-link-title-more'
                onClick={() => history.push(`./${path}`)}
            >查看更多</p>
        </div>
    )

    return titleTemplate
}

export default withRouter(LinkTitle)
